Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Type rename provider [Uses VS Code proposed API] #304

Closed
wants to merge 1 commit into from
Closed

Type rename provider [Uses VS Code proposed API] #304

wants to merge 1 commit into from

Conversation

xorye
Copy link

@xorye xorye commented Aug 5, 2020

Follows HTML's implementation: microsoft/vscode@01e01b1

To test this PR, you need the server side PR as well eclipse-lemminx/lemminx#836

Signed-off-by: David Kwon [email protected]

@xorye
Copy link
Author

xorye commented Aug 5, 2020

You need to use VS Code insiders: https://code.visualstudio.com/api/advanced-topics/using-proposed-api#using-a-proposed-api and set editor.renameOnType to true.

Currently, registerOnTypeRenameProvider is only available in the proposed VS Code API: https://github.com/microsoft/vscode/blob/16fb610b10d7cce67e5e70158e1ec93003e902d3/src/vs/vscode.proposed.d.ts#L1192

Demo for HTML: microsoft/vscode#88424 (comment)

@xorye xorye mentioned this pull request Aug 6, 2020
@xorye
Copy link
Author

xorye commented Aug 6, 2020

Demo:
onTypeRename

But we still suffer from this issue: #213 (comment)
onTypeRenameCompletion

@xorye xorye marked this pull request as ready for review August 10, 2020 14:42
@xorye xorye changed the title Type rename provider WIP Type rename provider Aug 10, 2020
@xorye xorye changed the title Type rename provider Type rename provider [Uses VS Code proposed API] Aug 10, 2020
@@ -9,6 +9,7 @@
"license": "EPL-1.0",
"bugs": "https://github.com/redhat-developer/vscode-xml/issues",
"preview": true,
"enableProposedApi": true,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we can only use it in insiders. The marketplace rejects publishing when enableProposedApi:true

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need to wait for microsoft/vscode#105394

@angelozerr
Copy link
Contributor

But we still suffer from this issue: #213 (comment)

It's very strange because this problem should be fixed. The only problem that I have seen is when you do this usecase with a XML element which doesnt comes from a XSD Schema (but it seems that it's not our usecase).

In the demo, I noticed that when you remove the d character completion opens, inmy case the completion is not opened (I must do a Ctrl+Space to open completion). Is there a settings for that?

@angelozerr
Copy link
Contributor

Please note the onTypeRanme is now in the LSP 3.16 specification. I have created an issue in LSP4J eclipse-lsp4j/lsp4j#469 If I understand correctly, we will avoid developping TypeScript code for supporting mirror cursor.

@angelozerr
Copy link
Contributor

Today this type rename provider became linked editing range with a LSP specification. This PR is replaced with #432

@angelozerr angelozerr closed this Apr 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants